package com.huangliusong.demo2;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
@Component
public class Bean1 {
    @PostConstruct
    public  void init(){
        System.out.println("初始化...");
    }
    public  void save(){
        System.out.println("say...");
    }

    @PreDestroy
    public void destory(){
        System.out.println("销毁...");
    }
}
